Hi,
It can be done, deploy your servlet with the "load on startup" checked and moce the code from main to init.
Check out:
http://www-10.lotus.com/ldd/stforum.nsf/ShowMyTopicsAllFlatweb/8cc19b7ba0518d9985256cd8002548e4?OpenDocument
This post contains a sample for writing a Sametime servlet, it's not a BOT so you'll have to make some modification.
Hope this helps
/Yaron